<template>
  <el-row class="title-container">
    <div class="title">
      <span class="title-before">{{ tIndex }}</span>
      <span>{{ title }}</span>
    </div>
    <el-col :span="12" style="text-align: center">
      <span>{{ step1 }}</span>
    </el-col>
    <el-col :span="12" style="position: relative; text-align: center">
      <span>{{ step2 }}</span>
      <el-button @click="show = !show" link type="primary" style="position: absolute; right: 6px; top: 9px">{{ show ? '收起' : '展开' }}</el-button>
    </el-col>
  </el-row>
</template>

<script setup>
const props = defineProps({
  tIndex: {
    type: String,
    default: '01'
  },
  title: {
    type: String,
    default: ''
  },
  step1: {
    type: String,
    default: ''
  },
  step2: {
    type: String,
    default: ''
  }
});
const show = defineModel();
</script>

<style lang="scss" scoped>
.title-container {
  position: relative;
  height: 32px;
  line-height: 32px;
  background: #f0f2f5;
  border-radius: 20px 0 0 20px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
}
.title {
  position: absolute;
  left: 0;
  width: 132px;
  text-align: center;
  padding-left: 14px;
  color: #333;
  background-color: #409eff;
  border-radius: 20px 0 0 20px;
  color: #fff;
  -webkit-clip-path: polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%);
  clip-path: polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%);
  &-before {
    position: absolute;
    top: 50%;
    left: 4px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    line-height: 24px;
    background-color: #fff;
    border-radius: 16px;
    color: #333;
  }
  &::after {
    position: absolute;
    top: 0;
    right: -40px;
    content: '';
    width: 40px;
    height: 36px;
    background-color: #409eff;
  }
}
</style>
